package com.javasm.springmybatis.mail;

import org.springframework.scheduling.annotation.Async;

import java.util.concurrent.TimeUnit;

/**
 * @Author：Drd
 * @Version：1.0
 * @Date：2021/12/29-15:53
 * @Since:jdk1.8
 * @Description:
 */
public class EmailService {
    @Async
  public void sendEmail(){
      String name=Thread.currentThread().getName();

      System.out.println("threadname==="+name);

      try {
          TimeUnit.SECONDS.sleep(3);
      } catch (InterruptedException e) {
          e.printStackTrace();
      }
  }


}
